using System;
using System.Collections.Generic;
using System.Text;

namespace FinanceAnalyzer
{
    class DateStamp : IComparable<DateStamp>
    {
        private int _year;
        private EMonth _month;

        public DateStamp(int year, EMonth month)
        {
            _year = year;
            _month = month;
        }

        public int Year
        {
            get { return _year; }
            set { _year = value; }
        }

        public EMonth Month
        {
            get { return _month; }
            set { _month = value; }
        }

        #region IComparable<DateStamp> Member

        public int CompareTo(DateStamp other)
        {
            int returnvalue = -1;

            if(this.Year == other.Year && this.Month == other.Month)
            {
                returnvalue = 1;
            }
            else
            {
                returnvalue = 0;         
            }

            return returnvalue;
        }

        #endregion
    }
}
